package com.winit.schedule.core.utils;

import java.util.List;

/**
 * 工具类
 * 
 * @author jianke.zhang 2015-3-12 上午9:44:42
 * @since 1.0
 */
public class ArrayUtils {

    public static boolean isEmpty(List<?> list) {
        if (null == list || list.isEmpty()) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(List<?> list) {
        if (null != list && !list.isEmpty()) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(Object[] arr) {
        if (null == arr || arr.length == 0) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(Object[] arr) {
        if (null != arr && arr.length != 0) {
            return true;
        }
        return false;
    }

    public static boolean contain(String[] strArr, String str) {
        if (ArrayUtils.isNotEmpty(strArr)) {
            for (String s : strArr) {
                if (s.equals(str)) {
                    return true;
                }
            }
        }
        return false;
    }

}
